3.197 \(\int \cot ^2(a+i \log (x)) \, dx\)

Optimal. Leaf size=48 \[ -\frac {2 e^{2 i a} x}{-x^2+e^{2 i a}}+2 e^{i a} \tanh ^{-1}\left (e^{-i a} x\right )-x \]

[Out]

-x-2*exp(2*I*a)*x/(exp(2*I*a)-x^2)+2*exp(I*a)*arctanh(x/exp(I*a))

________________________________________________________________________________________

Rubi [F]  time = 0.01, antiderivative size = 0, normalized size of antiderivative = 0.00, number of steps used = 0, number of rules used = 0, integrand size = 0, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.000, Rules used = {} \[ \int \cot ^2(a+i \log (x)) \, dx \]

Verification is Not applicable to the result.

[In]

Int[Cot[a + I*Log[x]]^2,x]

[Out]

Defer[Int][Cot[a + I*Log[x]]^2, x]

Rubi steps

\begin {align*} \int \cot ^2(a+i \log (x)) \, dx &=\int \cot ^2(a+i \log (x)) \, dx\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.08, size = 70, normalized size = 1.46 \[ \frac {-x \left (x^2-3\right ) \cos (a)+i x \left (x^2+3\right ) \sin (a)}{\left (x^2-1\right ) \cos (a)-i \left (x^2+1\right ) \sin (a)}+2 (\cos (a)+i \sin (a)) \tanh ^{-1}(x (\cos (a)-i \sin (a))) \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[a + I*Log[x]]^2,x]

[Out]

2*ArcTanh[x*(Cos[a] - I*Sin[a])]*(Cos[a] + I*Sin[a]) + (-(x*(-3 + x^2)*Cos[a]) + I*x*(3 + x^2)*Sin[a])/((-1 +
x^2)*Cos[a] - I*(1 + x^2)*Sin[a])

________________________________________________________________________________________

fricas [A]  time = 0.73, size = 72, normalized size = 1.50 \[ -\frac {x^{3} - {\left (x^{2} - e^{\left (2 i \, a\right )}\right )} e^{\left (i \, a\right )} \log \left (x + e^{\left (i \, a\right )}\right ) + {\left (x^{2} - e^{\left (2 i \, a\right )}\right )} e^{\left (i \, a\right )} \log \left (x - e^{\left (i \, a\right )}\right ) - 3 \, x e^{\left (2 i \, a\right )}}{x^{2} - e^{\left (2 i \, a\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(a+I*log(x))^2,x, algorithm="fricas")

[Out]

-(x^3 - (x^2 - e^(2*I*a))*e^(I*a)*log(x + e^(I*a)) + (x^2 - e^(2*I*a))*e^(I*a)*log(x - e^(I*a)) - 3*x*e^(2*I*a
))/(x^2 - e^(2*I*a))

________________________________________________________________________________________

giac [B]  time = 0.46, size = 79, normalized size = 1.65 \[ -\frac {x^{3}}{x^{2} - e^{\left (2 i \, a\right )}} - 2 \, {\left (\frac {\arctan \left (\frac {x}{\sqrt {-e^{\left (2 i \, a\right )}}}\right )}{\sqrt {-e^{\left (2 i \, a\right )}}} - \frac {x}{x^{2} - e^{\left (2 i \, a\right )}}\right )} e^{\left (2 i \, a\right )} + \frac {5 \, x e^{\left (2 i \, a\right )}}{x^{2} - e^{\left (2 i \, a\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(a+I*log(x))^2,x, algorithm="giac")

[Out]

-x^3/(x^2 - e^(2*I*a)) - 2*(arctan(x/sqrt(-e^(2*I*a)))/sqrt(-e^(2*I*a)) - x/(x^2 - e^(2*I*a)))*e^(2*I*a) + 5*x
*e^(2*I*a)/(x^2 - e^(2*I*a))

________________________________________________________________________________________

maple [A]  time = 0.06, size = 36, normalized size = 0.75 \[ -3 x -\frac {2 x}{\frac {{\mathrm e}^{2 i a}}{x^{2}}-1}+2 \arctanh \left (x \,{\mathrm e}^{-i a}\right ) {\mathrm e}^{i a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(a+I*ln(x))^2,x)

[Out]

-3*x-2*x/(exp(2*I*a)/x^2-1)+2*arctanh(x*exp(-I*a))*exp(I*a)

________________________________________________________________________________________

maxima [B]  time = 0.38, size = 278, normalized size = 5.79 \[ -\frac {2 \, {\left ({\left (-i \, \cos \relax (a) + \sin \relax (a)\right )} \arctan \left (\sin \relax (a), x + \cos \relax (a)\right ) + {\left (-i \, \cos \relax (a) + \sin \relax (a)\right )} \arctan \left (\sin \relax (a), x - \cos \relax (a)\right )\right )} x^{2} + 2 \, x^{3} - x {\left (6 \, \cos \left (2 \, a\right ) + 6 i \, \sin \left (2 \, a\right )\right )} + {\left (2 \, {\left (i \, \cos \relax (a) - \sin \relax (a)\right )} \cos \left (2 \, a\right ) - {\left (2 \, \cos \relax (a) + 2 i \, \sin \relax (a)\right )} \sin \left (2 \, a\right )\right )} \arctan \left (\sin \relax (a), x + \cos \relax (a)\right ) + {\left (2 \, {\left (i \, \cos \relax (a) - \sin \relax (a)\right )} \cos \left (2 \, a\right ) - {\left (2 \, \cos \relax (a) + 2 i \, \sin \relax (a)\right )} \sin \left (2 \, a\right )\right )} \arctan \left (\sin \relax (a), x - \cos \relax (a)\right ) - {\left (x^{2} {\left (\cos \relax (a) + i \, \sin \relax (a)\right )} - {\left (\cos \relax (a) + i \, \sin \relax (a)\right )} \cos \left (2 \, a\right ) + {\left (-i \, \cos \relax (a) + \sin \relax (a)\right )} \sin \left (2 \, a\right )\right )} \log \left (x^{2} + 2 \, x \cos \relax (a) + \cos \relax (a)^{2} + \sin \relax (a)^{2}\right ) + {\left (x^{2} {\left (\cos \relax (a) + i \, \sin \relax (a)\right )} - {\left (\cos \relax (a) + i \, \sin \relax (a)\right )} \cos \left (2 \, a\right ) - {\left (i \, \cos \relax (a) - \sin \relax (a)\right )} \sin \left (2 \, a\right )\right )} \log \left (x^{2} - 2 \, x \cos \relax (a) + \cos \relax (a)^{2} + \sin \relax (a)^{2}\right )}{2 \, x^{2} - 2 \, \cos \left (2 \, a\right ) - 2 i \, \sin \left (2 \, a\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(a+I*log(x))^2,x, algorithm="maxima")

[Out]

-(2*((-I*cos(a) + sin(a))*arctan2(sin(a), x + cos(a)) + (-I*cos(a) + sin(a))*arctan2(sin(a), x - cos(a)))*x^2
+ 2*x^3 - x*(6*cos(2*a) + 6*I*sin(2*a)) + (2*(I*cos(a) - sin(a))*cos(2*a) - (2*cos(a) + 2*I*sin(a))*sin(2*a))*
arctan2(sin(a), x + cos(a)) + (2*(I*cos(a) - sin(a))*cos(2*a) - (2*cos(a) + 2*I*sin(a))*sin(2*a))*arctan2(sin(
a), x - cos(a)) - (x^2*(cos(a) + I*sin(a)) - (cos(a) + I*sin(a))*cos(2*a) + (-I*cos(a) + sin(a))*sin(2*a))*log
(x^2 + 2*x*cos(a) + cos(a)^2 + sin(a)^2) + (x^2*(cos(a) + I*sin(a)) - (cos(a) + I*sin(a))*cos(2*a) - (I*cos(a)
 - sin(a))*sin(2*a))*log(x^2 - 2*x*cos(a) + cos(a)^2 + sin(a)^2))/(2*x^2 - 2*cos(2*a) - 2*I*sin(2*a))

________________________________________________________________________________________

mupad [B]  time = 2.19, size = 44, normalized size = 0.92 \[ -x+2\,\sqrt {{\mathrm {e}}^{a\,2{}\mathrm {i}}}\,\mathrm {atanh}\left (\frac {x}{\sqrt {{\mathrm {e}}^{a\,2{}\mathrm {i}}}}\right )-\frac {2\,x\,{\mathrm {e}}^{a\,2{}\mathrm {i}}}{{\mathrm {e}}^{a\,2{}\mathrm {i}}-x^2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(a + log(x)*1i)^2,x)

[Out]

2*exp(a*2i)^(1/2)*atanh(x/exp(a*2i)^(1/2)) - x - (2*x*exp(a*2i))/(exp(a*2i) - x^2)

________________________________________________________________________________________

sympy [A]  time = 0.27, size = 42, normalized size = 0.88 \[ - x + \frac {2 x e^{2 i a}}{x^{2} - e^{2 i a}} - \left (\log {\left (x - e^{i a} \right )} - \log {\left (x + e^{i a} \right )}\right ) e^{i a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(a+I*ln(x))**2,x)

[Out]

-x + 2*x*exp(2*I*a)/(x**2 - exp(2*I*a)) - (log(x - exp(I*a)) - log(x + exp(I*a)))*exp(I*a)

________________________________________________________________________________________